@extends('admin/layout')
@section('title','会员管理')
@section('content')
        <!-- Content Header (Page header) -->
        <section class="content-header" style="position: relative;">
            <h1>
                会员列表
                <small>添加会员</small>
                @if(session('success'))
                    <div class="alert alert-danger">
                        <li>{{session('success')}}</li>
                    </div>
                @endif
            </h1>
            <ol class="breadcrumb">
                <li><a href="{{asset('admin/index')}}"><i class="fa fa-th"></i> 管理首页</a></li>
                <li><i class="fa fa-users"></i> 会员管理</li>
                <li><a href="{{asset('admin/member')}}"><i class="fa fa-user"></i> 会员列表</a></li>
                <li class="active">添加会员</li>
            </ol>
        </section>
        <section class="content">
                <div class="row">
                    <div class="col-md-3">
                        <a href="/admin/message" class="btn btn-primary btn-block margin-bottom">返回消息列表</a>
                        <div class="box box-solid">
                            <div class="box-header with-border">
                                <h3 class="box-title">Folders</h3>
                                <div class="box-tools">
                                    <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                                    </button>
                                </div>
                            </div>
                            <div class="box-body no-padding">
                                <ul class="nav nav-pills nav-stacked">
                                    <li><a href="/admin/message"><i class="fa fa-inbox"></i> 新消息 <span
                                                    class="label label-primary pull-right">12</span></a></li>
                                    <li><a href="/admin/message/create"><i class="fa fa-envelope-o"></i> 发消息</a></li>
                                    <li><a href="/admin/message/receive"><i class="fa fa-file-text-o"></i> 收件箱</a></li>
                                    <li><a href="/admin/message/send"><i class="fa fa-filter"></i> 已发送 <span
                                                    class="label label-warning pull-right">65</span></a></li>
                                    <li><a href="/admin/message/delete"><i class="fa fa-trash-o"></i> 已删除</a></li>
                                </ul>
                            </div><!-- /.box-body -->
                        </div><!-- /. box -->
                        <div class="box box-solid">
                            <div class="box-header with-border">
                                <h3 class="box-title">Labels</h3>
                                <div class="box-tools">
                                    <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                                    </button>
                                </div>
                            </div><!-- /.box-header -->
                            <div class="box-body no-padding">
                                <ul class="nav nav-pills nav-stacked">
                                    <li><a href="#"><i class="fa fa-circle-o text-red"></i> Important</a></li>
                                    <li><a href="#"><i class="fa fa-circle-o text-yellow"></i> Promotions</a></li>
                                    <li><a href="#"><i class="fa fa-circle-o text-light-blue"></i> Social</a></li>
                                </ul>
                            </div><!-- /.box-body -->
                        </div><!-- /.box -->
                    </div><!-- /.col -->
                    <div class="col-md-9">
                        <form action="/admin/message" method="post">
                            {{csrf_field()}}
                        <div class="box box-primary">
                            <div class="box-header with-border">
                                <h3 class="box-title">发消息</h3>
                            </div><!-- /.box-header -->
                            <div class="box-body">
                                <div class="form-group">
                                    <input type="hidden" name="send_mem_id" value="{{session('member_id')}}">
                                    发送给:<input class="form-control" placeholder="接收人昵称. .  .必填" name="name" value="{{session('recman')}}">
                                </div>
                                <div class="form-group">
                                    标题:<input class="form-control" placeholder="标题. .  .必填" name="title" >
                                </div>
                                <div class="form-group">
                                    内容:
                                    <textarea id="compose-textarea" class="form-control" style="height: 300px" name="content">
                                    </textarea>
                                </div>
                            </div><!-- /.box-body -->
                            <div class="box-footer">
                                <div class="pull-right">
                                    <button class="btn btn-primary" id="btn"><i class="fa fa-envelope-o"></i> 发送
                                    </button>
                                </div>
                                <i class="fa fa-times"></i> <input type="reset" class="btn btn-default" value="丢弃">
                            </div><!-- /.box-footer -->
                        </div><!-- /. box -->
                        </form>
                        <script type="text/javascript">
                           $('.form-control').on('focus', function ()
                           {
                               $(this).css('border','1px solid blue')
                           }).on('blur',function(){
                              if($(this).val().length<1)
                              {
                                  $(this).css('border','2px solid red');
                                  $('#btn').attr('disabled','disabled');
                              }else{
                                  $('#btn').attr('disabled',false);
                              }
                           });

                        </script>
                    </div><!-- /.col -->
                </div><!-- /.row -->
        </section>
@stop